<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>字符串可以是对象</title>
</head>
<body>
<p>当使用 == 相等运算符时，相等字符串是相等的：</p>
<p id="demo"></p>

<script>
  var x="Bill";
  var y=new String("Bill");

  document.getElementById("demo").innerHTML=(x==y);
</script>

</body>
</html>

<!--输出结果：ture-->